import axiosInstance from '@/js/axiosself'

export default{

    getTable(PageNum,PageSize){
        return axiosInstance.get(`/UploadData/SelectUpDataTableData?PageNum=${PageNum}&PageSize=${PageSize}`)
    },

    Uplodimg(params){
         
        const file = params.file;
        // 使用FormData传参数和文件
        const form = new FormData();
        // 添加键值对
        form.append("imageFile", file);
        //  form.append("date", this.urlId);
        // 传给后台FormData， 此时form = {date: xx, file: xxx(FormData)}
        return axiosInstance.post("/uploadimg", form);

    },

    UploadData(params){
        return axiosInstance.get(`/UploadData/UpdataUpdata?uuid=${params.uuid}&address=${params.address}&kind=${params.kind}&time=${params.time}&name=${params.name}&code=${params.code}&img=${params.img}`);
    },


    //按条件查询
    GetUpDataBycode(code,PageNum,PageSize){
        return axiosInstance.get(`/UploadData/SelectUpDatabycode?code=${code}&PageNum=${PageNum}&PageSize=${PageSize}`)
    },

    DelUpData(uuid){
        return axiosInstance.get(`/admin/DelUploadData?uuid=${uuid}`)
    },


    






}